home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat2 / standard / read.z / read
Text File  |  1998-10-20  |  27KB  |  397 lines

  1.  
  2.  
  3.  
  4. rrrreeeeaaaadddd((((2222))))                                                                rrrreeeeaaaadddd((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _rrrr_eeee_aaaa_dddd, _rrrr_eeee_aaaa_dddd_vvvv, _pppp_rrrr_eeee_aaaa_dddd, _pppp_rrrr_eeee_aaaa_dddd_6666_4444 - read from file
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_uuuu_nnnn_iiii_ssss_tttt_dddd_...._hhhh_>>>>
  13.      _ssss_ssss_iiii_zzzz_eeee______tttt _rrrr_eeee_aaaa_dddd_((((_iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_,,,, _vvvv_oooo_iiii_dddd _****_bbbb_uuuu_ffff_,,,, _ssss_iiii_zzzz_eeee______tttt _nnnn_bbbb_yyyy_tttt_eeee_))))_;;;;
  14.      _ssss_ssss_iiii_zzzz_eeee______tttt _pppp_rrrr_eeee_aaaa_dddd_((((_iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_,,,, _vvvv_oooo_iiii_dddd _****_bbbb_uuuu_ffff_,,,, _ssss_iiii_zzzz_eeee______tttt _nnnn_bbbb_yyyy_tttt_eeee_,,,, _oooo_ffff_ffff______tttt _oooo_ffff_ffff_ssss_eeee_tttt_))))_;;;;
  15.      _ssss_ssss_iiii_zzzz_eeee______tttt _pppp_rrrr_eeee_aaaa_dddd_6666_4444_((((_iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_,,,, _vvvv_oooo_iiii_dddd _****_bbbb_uuuu_ffff_,,,, _ssss_iiii_zzzz_eeee______tttt _nnnn_bbbb_yyyy_tttt_eeee_,,,, _oooo_ffff_ffff_6666_4444______tttt _oooo_ffff_ffff_ssss_eeee_tttt_))))_;;;;
  16.  
  17.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_uuuu_iiii_oooo_...._hhhh_>>>>
  18.      _ssss_ssss_iiii_zzzz_eeee______tttt _rrrr_eeee_aaaa_dddd_vvvv_((((_iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_,,,, _cccc_oooo_nnnn_ssss_tttt _ssss_tttt_rrrr_uuuu_cccc_tttt _iiii_oooo_vvvv_eeee_cccc _****_iiii_oooo_vvvv_,,,, _iiii_nnnn_tttt _iiii_oooo_vvvv_cccc_nnnn_tttt_))))_;;;;
  19.  
  20. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  21.      _rrrr_eeee_aaaa_dddd attempts to read _n_b_y_t_e bytes from the file associated with _f_i_l_d_e_s
  22.      into the buffer pointed to by _b_u_f.  If _n_b_y_t_e is zero, _rrrr_eeee_aaaa_dddd returns zero
  23.      and has no other results.  _f_i_l_d_e_s is a file descriptor obtained from a
  24.      _cccc_rrrr_eeee_aaaa_tttt, _oooo_pppp_eeee_nnnn, _dddd_uuuu_pppp, _ffff_cccc_nnnn_tttt_llll, _pppp_iiii_pppp_eeee, or _iiii_oooo_cccc_tttt_llll system call.
  25.  
  26.      On devices capable of seeking, the _rrrr_eeee_aaaa_dddd starts at a position in the file
  27.      given by the file pointer associated with _f_i_l_d_e_s.  On return from _rrrr_eeee_aaaa_dddd,
  28.      the file pointer is incremented by the number of bytes actually read.
  29.  
  30.      Devices that are incapable of seeking always read from the current
  31.      position.  The value of a file pointer associated with such a file is
  32.      undefined.
  33.  
  34.      _pppp_rrrr_eeee_aaaa_dddd and _pppp_rrrr_eeee_aaaa_dddd_6666_4444 are the same as _rrrr_eeee_aaaa_dddd except that they do the equivalent
  35.      of an _llll_ssss_eeee_eeee_kkkk (for _pppp_rrrr_eeee_aaaa_dddd) or _llll_ssss_eeee_eeee_kkkk_6666_4444 (for _pppp_rrrr_eeee_aaaa_dddd_6666_4444) _o_f_f_s_e_t bytes with the
  36.      _w_h_e_n_c_e set to _SSSS_EEEE_EEEE_KKKK______SSSS_EEEE_TTTT before reading.  On return from _pppp_rrrr_eeee_aaaa_dddd or _pppp_rrrr_eeee_aaaa_dddd_6666_4444,
  37.      the file pointer is unchanged. If _ffff_iiii_llll_dddd_eeee_ssss refers to a file incapable of
  38.      seeking (a fifo or socket) then an error is returned and _eeee_rrrr_rrrr_nnnn_oooo will be
  39.      set to _EEEE_SSSS_PPPP_IIII_PPPP_EEEE.
  40.  
  41.      _rrrr_eeee_aaaa_dddd_vvvv performs the same action as _rrrr_eeee_aaaa_dddd, but places the input data into
  42.      the _i_o_v_c_n_t buffers specified by the members of the _i_o_v array: _i_o_v[0],
  43.      _i_o_v[1], ..., _i_o_v[_i_o_v_c_n_t-1].
  44.  
  45.      For _rrrr_eeee_aaaa_dddd_vvvv, the _iiii_oooo_vvvv_eeee_cccc structure contains the following members:
  46.  
  47.           _vvvv_oooo_iiii_dddd    _****_iiii_oooo_vvvv______bbbb_aaaa_ssss_eeee_;;;;
  48.           _ssss_ssss_iiii_zzzz_eeee______tttt    _iiii_oooo_vvvv______llll_eeee_nnnn_;;;;
  49.  
  50.      Each _iiii_oooo_vvvv_eeee_cccc entry specifies the base address and length of an area in
  51.      memory where data should be placed. _rrrr_eeee_aaaa_dddd_vvvv always fills one buffer
  52.      completely before proceeding to the next.
  53.  
  54.      On success, _rrrr_eeee_aaaa_dddd and _rrrr_eeee_aaaa_dddd_vvvv return the number of bytes actually read and
  55.      placed in the buffer; There are many possible reasons why this number may
  56.      be less than _n_b_y_t_e , without indicating end-of-file or an error. Some
  57.      common reasons include when the file is associated with a communication
  58.      line [see _iiii_oooo_cccc_tttt_llll(2) and _tttt_eeee_rrrr_mmmm_iiii_oooo(7)], or when the number of bytes left in
  59.      the file is less than _n_b_y_t_e, or when the file is a pipe or a special
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. rrrreeeeaaaadddd((((2222))))                                                                rrrreeeeaaaadddd((((2222))))
  71.  
  72.  
  73.  
  74.      file, or the system call was interrupted.  When end-of-file has been
  75.      reached, read will return a value of 0. A value greater than 0, but less
  76.      than _n_b_y_t_e , should not be construed as implying end-of-file, because
  77.      many devices and even filesystems can return short counts for various
  78.      reasons.
  79.  
  80.      _rrrr_eeee_aaaa_dddd reads data previously written to a file. If any portion of an
  81.      ordinary file prior to the end of file has not been written, _rrrr_eeee_aaaa_dddd returns
  82.      the number of bytes read as _0000. For example, the _llll_ssss_eeee_eeee_kkkk routine allows the
  83.      file pointer to be set beyond the end of existing data in the file. If
  84.      additional data is written at this point, subsequent reads in the gap
  85.      between the previous end of data and newly written data return bytes with
  86.      a value of _0000 until data is written into the gap.
  87.  
  88.      When attempting to _rrrr_eeee_aaaa_dddd from a file with _OOOO______DDDD_IIII_RRRR_EEEE_CCCC_TTTT or _FFFF_DDDD_IIII_RRRR_EEEE_CCCC_TTTT set, -1 will
  89.      be returned and _eeee_rrrr_rrrr_nnnn_oooo will be set to _EEEE_IIII_NNNN_VVVV_AAAA_LLLL if _nnnn_bbbb_yyyy_tttt_eeee or the current file
  90.      position is not a multiple of the underlying device's blocksize, _n_b_y_t_e is
  91.      too big or _b_u_f isn't properly aligned.  See also _FFFF______DDDD_IIII_OOOO_IIII_NNNN_FFFF_OOOO in the
  92.      _ffff_cccc_nnnn_tttt_llll(2) manual entry.
  93.  
  94.      When attempting to _rrrr_eeee_aaaa_dddd from a file with _OOOO______RRRR_SSSS_YYYY_NNNN_CCCC and _OOOO______SSSS_YYYY_NNNN_CCCC set, the read
  95.      will will wait to return until both the file data and file status to be
  96.      physically updated.  When attempting to _rrrr_eeee_aaaa_dddd from a file with _OOOO______RRRR_SSSS_YYYY_NNNN_CCCC and
  97.      _OOOO______DDDD_SSSS_YYYY_NNNN_CCCC set, the read will will wait to return until the file data has
  98.      been physically updated.
  99.  
  100.      A _rrrr_eeee_aaaa_dddd or _rrrr_eeee_aaaa_dddd_vvvv from a STREAMS [see _iiii_nnnn_tttt_rrrr_oooo(2)] file can operate in three
  101.      different modes: byte-stream mode, message-nondiscard mode, and message-
  102.      discard mode.  The default is byte-stream mode.  This can be changed
  103.      using the _IIII______SSSS_RRRR_DDDD_OOOO_PPPP_TTTT _iiii_oooo_cccc_tttt_llll(2) request [see _ssss_tttt_rrrr_eeee_aaaa_mmmm_iiii_oooo(7)], and can be tested
  104.      with the _IIII______GGGG_RRRR_DDDD_OOOO_PPPP_TTTT _iiii_oooo_cccc_tttt_llll(2) request.  In byte-stream mode, _rrrr_eeee_aaaa_dddd and _rrrr_eeee_aaaa_dddd_vvvv
  105.      usually retrieve data from the stream until they have retrieved _n_b_y_t_e
  106.      bytes, or until there
  107.      is no more data to be retrieved.  Byte-stream mode usually ignores
  108.      message boundaries.
  109.  
  110.      In STREAMS message-nondiscard mode, _rrrr_eeee_aaaa_dddd and _rrrr_eeee_aaaa_dddd_vvvv retrieve data until
  111.      they have read _n_b_y_t_e bytes, or until they reach a message boundary.  If
  112.      _rrrr_eeee_aaaa_dddd or _rrrr_eeee_aaaa_dddd_vvvv does not retrieve all the data in a message, the remaining
  113.      data is replaced on the stream and can be retrieved by the next _rrrr_eeee_aaaa_dddd or
  114.      _rrrr_eeee_aaaa_dddd_vvvv call.  Message-discard mode also retrieves data until it has
  115.      retrieved _n_b_y_t_e bytes, or it reaches a message boundary.  However, unread
  116.      data remaining in a message after the _rrrr_eeee_aaaa_dddd or _rrrr_eeee_aaaa_dddd_vvvv returns is discarded,
  117.      and is not available for a subsequent _rrrr_eeee_aaaa_dddd, _rrrr_eeee_aaaa_dddd_vvvv, or _gggg_eeee_tttt_mmmm_ssss_gggg [see
  118.      _gggg_eeee_tttt_mmmm_ssss_gggg(2)].
  119.  
  120.      When attempting to read from a regular file with mandatory file/record
  121.      locking set [see _cccc_hhhh_mmmm_oooo_dddd(2)], and there is a write lock owned by another
  122.      process on the segment of the file to be read:
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. rrrreeeeaaaadddd((((2222))))                                                                rrrreeeeaaaadddd((((2222))))
  137.  
  138.  
  139.  
  140.           If _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY or _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK is set, _rrrr_eeee_aaaa_dddd returns -1 and sets _eeee_rrrr_rrrr_nnnn_oooo to
  141.           _EEEE_AAAA_GGGG_AAAA_IIII_NNNN.
  142.  
  143.           If _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY and _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK are clear, _rrrr_eeee_aaaa_dddd sleeps until the blocking
  144.           record lock is removed.
  145.  
  146.      When attempting to read from an empty pipe (or FIFO):
  147.  
  148.           If no process has the pipe open for writing, _rrrr_eeee_aaaa_dddd returns 0 to
  149.           indicate end-of-file.
  150.  
  151.           If some process has the pipe open for writing and _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY is set,
  152.           _rrrr_eeee_aaaa_dddd returns 0.
  153.  
  154.           If some process has the pipe open for writing and _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK is set,
  155.           _rrrr_eeee_aaaa_dddd returns -1 and sets _eeee_rrrr_rrrr_nnnn_oooo to _EEEE_AAAA_GGGG_AAAA_IIII_NNNN.
  156.  
  157.           If _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY and _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK are clear, _rrrr_eeee_aaaa_dddd blocks until data is
  158.           written to the pipe or the pipe is closed by all processes that had
  159.           opened the pipe for writing.
  160.  
  161.      When attempting to read a file associated with a terminal or slave pty
  162.      that has no data currently available:
  163.  
  164.           If _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY is set, _rrrr_eeee_aaaa_dddd returns 0.
  165.  
  166.           If _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK is set, _rrrr_eeee_aaaa_dddd returns -1 and sets _eeee_rrrr_rrrr_nnnn_oooo to _EEEE_AAAA_GGGG_AAAA_IIII_NNNN.
  167.  
  168.           If _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY and _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK are clear, _rrrr_eeee_aaaa_dddd blocks until data becomes
  169.           available.
  170.  
  171.      When attempting to read a file associated with a master pty or any other
  172.      stream that is not a pipe or FIFO, or terminal, and that has no data
  173.      currently available:
  174.  
  175.           If _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY or _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK is set, _rrrr_eeee_aaaa_dddd returns -1 and sets _eeee_rrrr_rrrr_nnnn_oooo to
  176.           _EEEE_AAAA_GGGG_AAAA_IIII_NNNN.
  177.  
  178.           If _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY and _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK are clear, _rrrr_eeee_aaaa_dddd blocks until data becomes
  179.           available.
  180.  
  181.      When attempting to read from a regular file in a DMAPI file system, if
  182.      the DMAPI application will take a considerable time to make the file data
  183.      available:
  184.  
  185.           If _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY or _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK is set, _rrrr_eeee_aaaa_dddd returns -1 and sets _eeee_rrrr_rrrr_nnnn_oooo to
  186.           _EEEE_AAAA_GGGG_AAAA_IIII_NNNN.
  187.  
  188.           If _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY and _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK are clear, _rrrr_eeee_aaaa_dddd sleeps until the the
  189.           DMAPI application has made the file data available.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. rrrreeeeaaaadddd((((2222))))                                                                rrrreeeeaaaadddd((((2222))))
  203.  
  204.  
  205.  
  206.      When reading from a STREAMS file, handling of zero-byte messages is
  207.      determined by the current read mode setting.  In byte-stream mode, _rrrr_eeee_aaaa_dddd
  208.      accepts data until it has read _n_b_y_t_e bytes, or until there is no more
  209.      data to read, or until a zero-byte message block is encountered.  _rrrr_eeee_aaaa_dddd
  210.      then returns the number of bytes read, and places the zero-byte message
  211.      back on the stream to be retrieved by the next _rrrr_eeee_aaaa_dddd or _gggg_eeee_tttt_mmmm_ssss_gggg [see
  212.      _gggg_eeee_tttt_mmmm_ssss_gggg(2)].  In the two other modes, a zero-byte message returns a value
  213.      of 0 and the message is removed from the stream.  When a zero-byte
  214.      message is read as the first message on a stream, a value of 0 is
  215.      returned regardless of the _rrrr_eeee_aaaa_dddd mode.
  216.  
  217.      A _rrrr_eeee_aaaa_dddd or _rrrr_eeee_aaaa_dddd_vvvv from a STREAMS file returns the data in the message at
  218.      the front of the stream head read queue, regardless of the priority band
  219.      of the message.
  220.  
  221.      Normally, a _rrrr_eeee_aaaa_dddd from a STREAMS file can only process messages with data
  222.      and without control information.  The _rrrr_eeee_aaaa_dddd fails if a message containing
  223.      control information is encountered at the stream head.  This default
  224.      action can be changed by placing the stream in either control-data mode
  225.      or control-discard mode with the _IIII______SSSS_RRRR_DDDD_OOOO_PPPP_TTTT _iiii_oooo_cccc_tttt_llll(2).  In control-data
  226.      mode, control messages are converted to data messages by _rrrr_eeee_aaaa_dddd.  In
  227.      control-discard mode, control messages are discarded by _rrrr_eeee_aaaa_dddd, but any
  228.      data associated with the control messages is returned to the user.
  229.  
  230.      _rrrr_eeee_aaaa_dddd and _rrrr_eeee_aaaa_dddd_vvvv fail if one or more of the following are true:
  231.  
  232.      _EEEE_AAAA_CCCC_CCCC_EEEE_SSSS         _f_i_l_d_e_s is open to a dynamic device and read permission is
  233.                     denied.
  234.  
  235.      _EEEE_AAAA_GGGG_AAAA_IIII_NNNN         Mandatory file/record locking was set, _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY or
  236.                     _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK was set, and there was a blocking record lock.
  237.  
  238.      _EEEE_AAAA_GGGG_AAAA_IIII_NNNN         Total amount of system memory available when reading via
  239.                     raw I/O is temporarily insufficient.
  240.  
  241.      _EEEE_AAAA_GGGG_AAAA_IIII_NNNN         No data is waiting to be read on a file associated with a
  242.                     tty device and _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK was set.
  243.  
  244.      _EEEE_AAAA_GGGG_AAAA_IIII_NNNN         No message is waiting to be read on a stream and _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY
  245.                     or _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK was set.
  246.  
  247.      _EEEE_AAAA_GGGG_AAAA_IIII_NNNN         A DMAPI application might delay a considerable time
  248.                     retrieving the file data, and _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY or _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK was
  249.                     set.
  250.  
  251.      _EEEE_BBBB_AAAA_DDDD_FFFF          _f_i_l_d_e_s is not a valid file descriptor open for reading.
  252.  
  253.      _EEEE_BBBB_AAAA_DDDD_MMMM_SSSS_GGGG        Message waiting to be read on a stream is not a data
  254.                     message.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. rrrreeeeaaaadddd((((2222))))                                                                rrrreeeeaaaadddd((((2222))))
  269.  
  270.  
  271.  
  272.      _EEEE_DDDD_EEEE_AAAA_DDDD_LLLL_KKKK        The _rrrr_eeee_aaaa_dddd was going to go to sleep and cause a deadlock to
  273.                     occur.
  274.  
  275.      _EEEE_FFFF_AAAA_UUUU_LLLL_TTTT         _b_u_f points outside the allocated address space.
  276.  
  277.      _EEEE_IIII_NNNN_TTTT_RRRR          A signal was caught during the _rrrr_eeee_aaaa_dddd or _rrrr_eeee_aaaa_dddd_vvvv system call
  278.                     and no bytes had been read.
  279.  
  280.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL         Attempted to read from a stream linked to a multiplexor.
  281.  
  282.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL         _f_i_l_d_e_s has _OOOO______DDDD_IIII_RRRR_EEEE_CCCC_TTTT or _FFFF_DDDD_IIII_RRRR_EEEE_CCCC_TTTT set and either the buffer
  283.                     alignment, current file pointer alignment or read request
  284.                     size is not valid for direct I/O.  See also _FFFF______DDDD_IIII_OOOO_IIII_NNNN_FFFF_OOOO on
  285.                     _ffff_cccc_nnnn_tttt_llll(2).
  286.  
  287.      _EEEE_IIII_OOOO            A physical I/O error has occurred, or the process is in a
  288.                     background process group and is attempting to read from
  289.                     its controlling terminal, and either the process is
  290.                     ignoring or blocking the _SSSS_IIII_GGGG_TTTT_TTTT_IIII_NNNN signal or the process
  291.                     group of the process is orphaned.
  292.  
  293.      _EEEE_IIII_OOOO            _f_i_l_d_e_s is open to a device that is in the process of
  294.                     closing.
  295.  
  296.      _EEEE_IIII_OOOO            _f_i_l_d_e_s has _OOOO______DDDD_IIII_RRRR_EEEE_CCCC_TTTT or _FFFF_DDDD_IIII_RRRR_EEEE_CCCC_TTTT set and the number of bytes
  297.                     requested by _rrrr_eeee_aaaa_dddd or _rrrr_eeee_aaaa_dddd_vvvv is greater than the number of
  298.                     bytes between the current file pointer position and end of
  299.                     file.
  300.  
  301.      _EEEE_NNNN_OOOO_LLLL_CCCC_KKKK         The system record lock table was full, so the _rrrr_eeee_aaaa_dddd or
  302.                     _rrrr_eeee_aaaa_dddd_vvvv could not go to sleep until the blocking record lock
  303.                     was removed.
  304.  
  305.      _EEEE_NNNN_XXXX_IIII_OOOO          The device associated with _f_i_l_d_e_s is a block special or
  306.                     character special file and the value of the file pointer
  307.                     is out of range.
  308.  
  309.      _EEEE_SSSS_PPPP_IIII_PPPP_EEEE         _p_r_e_a_d or _p_r_e_a_d_6_4 was called on a file incapable of
  310.                     seeking.
  311.  
  312.      In addition, _rrrr_eeee_aaaa_dddd_vvvv may return one of the following errors:
  313.  
  314.      _EEEE_FFFF_AAAA_UUUU_LLLL_TTTT         _i_o_v points outside the allocated address space.
  315.  
  316.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL         _i_o_v_c_n_t was less than or equal to 0 or greater than
  317.                     _{{{{_IIII_OOOO_VVVV______MMMM_AAAA_XXXX_}}}}.  _{{{{_IIII_OOOO_VVVV______MMMM_AAAA_XXXX_}}}} is the maximum number of _iiii_oooo_vvvv_eeee_cccc
  318.                     structures that one process has available for use with
  319.                     _rrrr_eeee_aaaa_dddd_vvvv.  The value _{{{{_IIII_OOOO_VVVV______MMMM_AAAA_XXXX_}}}} can be obtained from a call to
  320.                     _ssss_yyyy_ssss_cccc_oooo_nnnn_ffff() [see _ssss_yyyy_ssss_cccc_oooo_nnnn_ffff(3C)].
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. rrrreeeeaaaadddd((((2222))))                                                                rrrreeeeaaaadddd((((2222))))
  335.  
  336.  
  337.  
  338.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL         The sum of the _iiii_oooo_vvvv______llll_eeee_nnnn values in the _i_o_v array overflowed
  339.                     a 32-bit integer.
  340.  
  341.      _EEEE_TTTT_IIII_MMMM_EEEE_DDDD_OOOO_UUUU_TTTT      The object of the read is located on a remote system which
  342.                     is not available [see _iiii_nnnn_tttt_rrrr_oooo(2)].
  343.  
  344.           A _rrrr_eeee_aaaa_dddd from a STREAMS file also fails if an error message is received
  345.           at the stream head.  In this case, _eeee_rrrr_rrrr_nnnn_oooo is set to the value
  346.           returned in the error message.  If a hangup occurs on the stream
  347.           being read, _rrrr_eeee_aaaa_dddd continues to operate normally until the stream head
  348.           read queue is empty.  Thereafter, it returns 0.
  349.  
  350. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  351.      _iiii_nnnn_tttt_rrrr_oooo(2), _cccc_rrrr_eeee_aaaa_tttt(2), _dddd_uuuu_pppp(2), _ffff_cccc_nnnn_tttt_llll(2), _gggg_eeee_tttt_mmmm_ssss_gggg(2), _iiii_oooo_cccc_tttt_llll(2), _oooo_pppp_eeee_nnnn(2),
  352.      _pppp_iiii_pppp_eeee(2), _rrrr_eeee_cccc_vvvv(3N), _ssss_tttt_rrrr_eeee_aaaa_mmmm_iiii_oooo(7), _ssss_yyyy_ssss_cccc_oooo_nnnn_ffff(3C), _tttt_eeee_rrrr_mmmm_iiii_oooo(7), _pppp_tttt_yyyy(7M).
  353.  
  354. NNNNOOOOTTTTEEEESSSS
  355.      _rrrr_eeee_aaaa_dddd updates the time of last access (see _ssss_tttt_aaaa_tttt(2)) of the file.
  356.  
  357. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  358.      On success a non-negative integer is returned indicating the number of
  359.      bytes actually read.  Otherwise, a -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to
  360.      indicate the error.
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.